$(function () {
    let data=myAjax("/navcompany",{},"get");
    setCompanyData(data.companyModel);
    setNavData(data.navList);
})

function setCompanyData(data) {

    $("#logo").attr("src", data.logo);
    $("#phone").html(data.phone);
    $("#ad").html(data.ad);
    $("#net").html("网址:" + data.net);
    $("#email").html("邮箱:" + data.email + "联系电话:" + data.linePhone);
    $("#address").html("联系地址:" + data.address);
    $("#version").html(data.version);

}

function setNavData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '                <a href="' + data[i].href + '">\n' +
            '                    <div>' + data[i].title + '</div>\n' +
            '                </a>';
    }
    $("#navHtml").html(html);
}
